class AccountFlowsController < ApplicationController
  before_action :set_account_folw, only: [:destroy]
  def index
   @account_flows =  current_user.account_flows.paginate(page: params[:page]).order(created_at: :desc)
  end
  def destroy
    @account_flow.destroy
    flash[:success] = '删除成功'
    redirect_to request.referrer ||  account_flows_path
  end

  def set_account_folw
    @account_flow = AccountFlow.find(params[:id])
  end
end
